export const PARAMS_PARK_STATISTICS = [
    {
        type: "a-range-picker",
        field: "day",
        title: "开始日期",
        value: [],
        props: {
            mode: ['month', 'month'],
            dateFormat: "YYYY-MM",
        },
        emit: ['panelChange'],
        emitPrefix: 'btn-day',
    },
    {
        type: "select",
        field: "parkId",
        title: "选择园区",
        value: "",
        options: [],
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
]
export const PARAMS_ENTERPRISE_STATISTICS = [
    {
        type: "RangePicker",
        field: "day",
        title: "日期",
        value: [],
        props: {
            type: "daterange",
            dateFormat: "YYYY-MM-DD",
            "start-placeholder":"开始日期",
            "end-placeholder":"结束日期",
        },
    },
    {
        type: "select",
        field: "enterpriseId",
        title: "选择企业",
        value: "",
        options: [],
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
]
export const PARAMS_USER_STATISTICS = [
    {
        type: "RangePicker",
        field: "day",
        title: "日期",
        value: [],
        props: {
            type: "daterange",
            dateFormat: "YYYY-MM-DD",
            "start-placeholder":"开始日期",
            "end-placeholder":"结束日期",
        },
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
]

export const billingOptions = {
        title: {
          text: 'Referer of a Website',
          subtext: 'Fake Data',
          left: 'center'
        },
        tooltip: {
          trigger: 'item'
        },
        legend: {
          orient: 'vertical',
          left: 'left'
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: '50%',
            data: [
              { value: 1048, name: 'Search Engine' },
              { value: 735, name: 'Direct' },
              { value: 580, name: 'Email' },
              { value: 484, name: 'Union Ads' },
              { value: 300, name: 'Video Ads' }
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        ]
}

export const parkChartOptions = {
   grid:{
        left: 0,
        right: 10,
        bottom: 0,
        top:30,
        containLabel: true
    },
    xAxis:{
        type : 'category',
        data: [],
        axisLabel:{
            interval:0,
            rotate: 0,
            fontSize: 16
        },
        axisTick: {
            show: false
        },
    },
    yAxis:[
        {
            position:'left',
            type: 'value',
            name: '',
            axisTick: {
                show: true
            },
            axisLine:{show:false},
            axisLabel: {
                textStyle:{color:'#999',fontSize: 18},
            },
            splitLine: {
                show: true,
            }
        }
    ],
    series:[
        {
            name:'',
            type:'bar',
            label: {
                show: true, 
                position: 'top', 
                distance: 20, 
                verticalAlign: 'middle',
                textStyle: { 
                    color: 'black',
                    fontSize: 16
                },
                formatter: (params) => {
                    var str = '';
                    if (params.data.yAxisIndex === 1) {
                        str = '人';
                    } else if (params.data.yAxisIndex === 2) {
                        str = '次';
                    } else if (params.data.yAxisIndex === 3) {
                        str = '笔';
                    } else if (params.data.yAxisIndex === 4) {
                        str = '元';
                    }
                    return params.data.value +' '+str;
                },
            },
            itemStyle: {
                normal: {
                    barBorderRadius:[30,30,0,0],
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: '#00C0FA'
                    }, {
                        offset: 1,
                        color: '#015EEA'
                    }]),
                }
            },
            animationDuration:2800,
            animationEasing:"cubicInOut",
            barWidth:40,
            data: []
        }
    ]
}
export const parkLineChartOptions = {
    tooltip: {
        trigger: 'axis'
    },
    grid: {
        left: 20,
        right: 90,
        bottom: 0,
        top:50,
        containLabel: true
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        axisLabel:{
            interval:0,
            rotate: 0,
            fontSize: 16
        },
        data: ['线上总金额','线下总金额','总金额合计','线上服务费总额','线下服务费总额','服务费总额合计','线上开票金额','线下开票金额','开票金额合计']
    },
    yAxis: {
        type: 'value',
        offset:15
    },
    series: [
        {
            name: '',
            type: 'line',
            smooth:true,
            symbolSize:3,
             itemStyle: {
                normal: {
                    label:{
                        show:true,
                        position:[-10,-20],
                        textStyle:{
                            fontSize:16,
                            color:'#015EEA'
                        },
                        formatter: (params) => {
                            return params.value +'元';
                        },
                    }
                },
            },
            data: []
        }
    ]
}
export const OPTION_INLINE = {
    form: {layout: 'inline'},
    resetBtn: false,
    submitBtn: false
}
export const OPTION_BLOCK= {
    form: { layout: "vertical" },
    row:{gutter: 20},
    resetBtn: false,
    submitBtn: false
}
 